package com.opensource.component.http;

import com.opensource.component.demo.DeclareReportStatementRequest;
import com.opensource.component.register.RegisterStatementManager;
import java.util.Map;
import org.springframework.web.client.RestTemplate;

/**
 * @author ZonLen since on 2022/5/31 上午9:25
 */
public class DeclareReportExecutor {

  private static RestTemplate restTemplate;

  public static Map<String, Object> fetchData(DeclareReportStatementRequest request) {
    return restTemplate
        .postForObject(RegisterStatementManager.callbackUrl(request.getCode()), request, Map.class);
  }

}
